<?php
header("Content-Type:text/html;charset=utf-8"); 
/*include '../dbConfig/mysqlFun.php';
$mysqlDB = new mysqlFun();*/

/*$conn = mysql_connect( "localhost", "root", "root", true,131072 ) or die( "Failed to connect to MySQL server" );
mysql_select_db( "autokaa", $conn ) or die( "Could not select test database" );
 
mysql_query("drop procedure if exists test2");
$sql = "create procedure test2(INOUT cc INT)";
$sql .= "\nbegin";//\n
$sql .= "\nselect cc;";
$sql .= "\nset cc=2;";
$sql .= "\nselect cc;";//语句加;号
$sql .= "\nend";
 
mysql_query($sql);

mysql_query("set @cc=3"); 
$r = mysql_query("call test2(@cc)"); 
 
//$r = mysql_query("select @cc");
while($row = mysql_fetch_array($r,MYSQL_ASSOC))
{
    print_r($row);
}*/


//使用mysqli输入多个结果集
/*error_reporting("E_ALL");
$rows = array ();    
$db = new mysqli("localhost", "root", "root","autokaa");    
if (mysqli_connect_errno()){    
    $this->message('Can not connect to MySQL server');    
}    
$db->query("SET NAMES UTF8");    
$db->query("SET @cc=3");  
if($db->real_query("call test2(@cc)")){    
    do{    
        if($result = $db->store_result()){    
            while ($row = $result->fetch_assoc()){    
                array_push($rows, $row);    
            }    
            $result->close();    
        }    
    }while($db->next_result());    
}    
$db->close();   
print_r($rows); */ 
?>
